#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
void solve()
{
    ll n;
    cin >> n;
    if (n <= 6)
        cout << 1 << endl;
    else if (n % 6 == 0)
    {
        cout << n / 6 << endl;
    }
    else
    {
        cout << 2 * (n / 6) << endl;
    }
}
int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}
